package com.xinqi.modules.discuss.discuss.client;

import com.xinqi.common.base.constants.ServiceNameConstants;
import com.xinqi.common.base.response.PageInfo;
import com.xinqi.common.base.response.R;
import com.xinqi.modules.discuss.discuss.dto.req.CourseDiscussStudentLogCreateDTO;
import com.xinqi.modules.discuss.discuss.dto.req.CourseDiscussStudentLogQueryDTO;
import com.xinqi.modules.discuss.discuss.dto.req.CourseDiscussStudentLogUpdateDTO;
import com.xinqi.modules.discuss.discuss.dto.rsp.CourseDiscussStudentLogResultDTO;
import com.xinqi.modules.discuss.discuss.factory.CourseDiscussStudentLogFallbackFactory;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

/**
 * 客户端
 *
 * @author: wenjie
 * @date: 2023/10/30
 */
@FeignClient(value = ServiceNameConstants.XQ_DISCUSS, fallbackFactory = CourseDiscussStudentLogFallbackFactory.class)
public interface CourseDiscussStudentLogClient {

    /**
     * -分页
     */
    @GetMapping("/course-discuss-student-log/page")
    R<PageInfo<CourseDiscussStudentLogResultDTO>> page(CourseDiscussStudentLogQueryDTO dto);

    /**
     * -详情
     */
    @GetMapping("/course-discuss-student-log/{id}")
    R<CourseDiscussStudentLogResultDTO> findById(@PathVariable("id") Long id);

    /**
     * 新增
     */
    @PostMapping("/course-discuss-student-log")
    R<Long> insert(@RequestBody CourseDiscussStudentLogCreateDTO dto);

    /**
     * 修改
     */
    @PutMapping("/course-discuss-student-log/{id}")
    public R<Boolean> update(@PathVariable("id") Long id, @RequestBody CourseDiscussStudentLogUpdateDTO dto);

    /**
     * 删除
     */
    @DeleteMapping("/course-discuss-student-log/{id}")
    R<Boolean> delete(@PathVariable("id") Long id);

}
